package jgl.vajra.management.part.order.activity;

import com.gyf.immersionbar.ImmersionBar;

import jgl.vajra.management.R;
import jgl.vajra.management.databinding.ActivitySecurityCenterBinding;
import jgl.vajra.management.manager.IntentManager;
import jgl.vajra.management.part.order.contract.SecurityCenterContract;
import jgl.vajra.management.part.order.viewModel.SecurityCenterViewModel;
import jgl.vajra.management.widget.mvvm.factory.CreateViewModel;
import jgl.vajra.management.widget.mvvm.view.BaseMVVMActivity;
import jgl.vajra.management.widget.utils.PhoneUtils;
import jgl.vajra.management.widget.utils.ToastUtils;

@CreateViewModel(SecurityCenterViewModel.class)
public class SecurityCenterActivity extends BaseMVVMActivity<SecurityCenterViewModel, ActivitySecurityCenterBinding> implements SecurityCenterContract.View {
    @Override
    public int getLayoutId() {
        return R.layout.activity_security_center;
    }

    @Override
    public void initView() {
        super.initView();
        mBinding.setView(this);

        ImmersionBar.with(this).statusBarColor(R.color.color_1e8bff).navigationBarColor(R.color.white).fitsSystemWindows(true).statusBarDarkFont(false, 0.2f).init();

        mBinding.toolbar.setNavigationIcon(R.drawable.ic_left_arrow_white);
        mBinding.toolbar.setNavigationOnClickListener(view -> finish());

    }

    //紧急联系人
    @Override
    public void onEmergencyContact() {
        IntentManager.toEmergencyContactActivity(this);
    }

    //号码保护
    @Override
    public void onProtectPhone() {
       // IntentManager.toProtectPhoneActivity(this);
    }

    //分享行程
    @Override
    public void onShareItinerary() {
        ToastUtils.showShort("分享行程");
    }

    //报警
    @Override
    public void onPolice() {
        PhoneUtils.dial(this,"110");
    }
}
